<script type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script>

<div class="span10" id="datacontent">
    <ul class="breadcrumb">
        <li><a href="/excecise/index/index">剑雅真题</a> <span class="divider">/</span></li>
        <li class="active">写作练习</li>
        <li style="float: right"><a href="/exercise/write/add?cate_id=<?php echo $cate_id?>">添加题目</a></li>
    </ul>
   
    <h4>题目列表</h4>
    <form action="<?php echo baseUrl?>/exercise/write/index" method="get" class="form-horizontal">
        <table class="table">
            <tr>
                <td>
                    所属剑雅：
                </td>
                <td>
                    <select name="cate_id" id="">
                        <option ></option>
                        <?php foreach ($cate as $k => $v): ?>
                            <option <?php echo $cate_id==$v['cate_id'] ? "selected=selected" : ""?> value="<?php echo $v['cate_id']?>"><?php echo $v['name']?></option>

                        <?php endforeach ?>
                    </select>
                </td>
                <td>
                    <button class="btn btn-primary" type="submit">提交</button>
                </td>
            </tr>
        </table>
    </form>
    <form action=" " id="checkPush" method="post">
        <table class="table table-hover">
            <thead>
            <tr>
                <th width="80">ID</th>
                <th>所属剑雅</th>
                <th>名称</th>
                <th>题目</th>
                <!-- <th>描述</th> -->
                <!-- <th>难度</th>
                <th>题型</th>
                <th>话题</th> -->
                <th>考点</th>
                <th>浏览量</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            	<?php
	            foreach($data['data'] as $v) {
	                ?>
	                <tr>
	                    <td><span><?php echo $v['id']?></span></td>
	                    <td><span><?php echo $v['catName']?></span></td>
	                    <td><span><?php echo $v['name']?></span></td>
	                    <td><span><?php echo $v['title']?></span></td>
	                    <!-- <td><span><?php echo $v['description']?></span></td> -->
	                    <td><span><?php echo $v['test_site']?></span></td>
	                    <td><span><?php echo $v['viewCount']?></span></td>
	                    <td><span><?php echo $v['createTime']?></span></td>
	                    <td>
	                        <div>
	                            <a class="btn" href="<?php echo baseUrl ?>/exercise/write/update?id=<?php echo $v['id'] ?>&cate_id=<?php echo $cate_id?>">修改</a>
                                <a class="btn" href="<?php echo baseUrl ?>/exercise/write/update-detail?id=<?php echo $v['id'] ?>&cate_id=<?php echo $cate_id?>">修改详情</a>
	                        </div>
	                    </td>
	                </tr>

	                <?php
	            }
	            ?>
            </tbody>
        </table>
        <div class="control-group">
            <div class="controls">
            </div>
        </div>
        <input type="hidden" name="url" value="<?php echo Yii::$app->request->getUrl()?>" />
    </form>
    <div class="pagination pagination-right">
        <?php use yii\widgets\LinkPager;?>
        <?php echo LinkPager::widget([
            'pagination' => $data['pageStr'],
        ])?>
    </div>
</div>
<script>

</script>